<html><head><title>GrabImage</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">GrabImage()</font></b></p>
<p><b>Syntax</b></p><blockquote>
Result = <font color="#3A3966"><b>GrabImage</b></font>(#Image1, #Image2, x, y, Width, Height)</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Create a new image with the selected area on the source image. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#Image1</i></td>
<td width="90%"> 
The source image. 

</td></tr>
<tr><td><i>#Image2</i></td>
<td> 
A number to identify the new image. <a href="../reference/purebasic_objects.html">#PB_Any</a> can be specified to 
auto-generate this number. 
<br>
<br>
Note: The number of an existing image created using <font color="#924B72">#PB_Any</font> can not be used as the target image. 
Instead, the existing image must be freed and a new number generated by passing <font color="#924B72">#PB_Any</font> here. 

</td></tr>
<tr><td><i>x, y, Width, Height</i></td>
<td> 
The location and size of the area to copy into the new image. 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>

Returns nonzero if the image was created successfully and zero if the image could not be created. 
If <font color="#924B72">#PB_Any</font> was specified as the #Image2 parameter then the auto-generated number is returned on success. 

</blockquote><p><b>See Also</b></p><blockquote>

<a href="createimage.html">CreateImage()</a>, <a href="loadimage.html">LoadImage()</a>, <a href="catchimage.html">CatchImage()</a>, <a href="copyimage.html">CopyImage()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=freeimage.html>FreeImage()</a> - <a href="index.html">Image Index</a> - <a href="imagedepth.html">ImageDepth()</a> -><br><br>

</body></html>